﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Wrappers.WindowsMediaPlayer;

namespace Music
{
    /// <summary>
    /// Interaction logic for WidgetControl.xaml
    /// </summary>
    public partial class WidgetControl : UserControl
    {
        WmpControl mediaPlayer;

        public WidgetControl()
        {
            InitializeComponent();
        }

        public void Load()
        {
            Widget.Instance.SetBackground(Brushes.Transparent);

            mediaPlayer = new WmpControl();

            if (mediaPlayer.IsMediaLoaded)
            {
                AlbumArt.Source = mediaPlayer.CurrentMedia.Picture;
            }
        }
    }
}
